//
//  InteractiveTransition.h
//  BriefBookAnimation
//
//  Created by Burn on 2019/6/27.
//  Copyright © 2019 menksoft. All rights reserved.
// Percent 百分比 Driven 驱动 Interactive 交互式 Transition 过度

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^GestureConfig)(void);

//  方向
typedef NS_ENUM(NSUInteger, GestureDirecation) {
    GestureDirecationLeft = 0,
    GestureDirecationRight,
    GestureDirecationUp,
    GestureDirecationDown
};

//  方式
typedef NS_ENUM(NSUInteger, InteractiveTransitionType) {
    InteractiveTransitionTypePresent = 0,
    InteractiveTransitionTypeDismiss,
    InteractiveTransitionTypePush,
    InteractiveTransitionTypePop
};

@interface InteractiveTransition : UIPercentDrivenInteractiveTransition
/**记录是否开始手势，判断pop操作是手势触发还是返回键触发*/
@property (nonatomic, assign) BOOL interation;
/**促发手势present的时候的config，config中初始化并present需要弹出的控制器*/
@property (nonatomic, copy) GestureConfig presentConifg;
/**促发手势push的时候的config，config中初始化并push需要弹出的控制器*/
@property (nonatomic, copy) GestureConfig pushConifg;

+ (instancetype)interactiveTransitionWithTransitionType:(InteractiveTransitionType)type GestureDirection:(GestureDirecation)direction;

- (instancetype)initWithTransitionType:(InteractiveTransitionType)type GestureDirection:(GestureDirecation)direction;


- (void)addPanGestureForViewController:(UIViewController *)vc;
@end

NS_ASSUME_NONNULL_END
